<?php

class TourGiftRewardAction extends SzAbstractAction
{
    Protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
    );

    /**
     * @param $userId
     * @param $id
     * @param $step
     * @param $reqTime
     * @return SzResponse
     * @throws SzException
     */
    public function execute($userId,$id,$step,$reqTime) {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_TOUR_GIFT_FUNC)) {
            return $this->buildResponse(false);
        }
        return $this->buildResponse(
            TourGiftService::get()->getReward($userId,$id,$step,$reqTime)
        );
    }
}